import {api} from '@/packagePages/pages/order/libs/api.js';
let _self;
export const index =  {
	props: {
		show: {type: Boolean,default: false},
		orderId: {type: Number,default: 0},
		title: {type: String,default: ""},
	},
	data() {
		return {
			host:process.env.HOST,
			id:this.orderId,
			showBox:false,
			boxTitle:this.title,
			refundInfo:[]
		}
	},
	
	watch:{
		show(val){this.showBox=val;},
		
		showBox(val){
			this.$emit('update:show', val);
		},
		orderId(val){
		
			this.id=val;
			if(val){
				this.initData();
			}
		},
		title(val){this.boxTitle=val;},
	},
	created() {
		_self = this;
	},
	
	methods: {
		async initData(){
			let ret=await api.refundQuery({"id":this.id});
			if(ret) this.refundInfo=ret;
		},

		cancel(e){
			this.showBox=false;
		},
		confirmBox(e){
			this.showBox=false;
		},
		submitForm(){
			
		}
	

	}
}